<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>5、css之宽高&字体&颜色&边框&文本&光标&伪类选择器</title>
    <style>
        .box1{
            width: 100px;
            height: 100px;
            border-width: 30px;
            border-style: solid;
            border-top-color: red;
            border-bottom-color: blue;
            border-right-color: green;
            border-left-color: orange;
        }
        .box2{
            width: 0;
            height: 0;
            border-width: 30px;
            border-style: solid;
            border-top-color: red;
            border-bottom-color: blue;
            border-right-color: green;
            border-left-color: orange;
        }
        .box3{
            width: 0;
            height: 0;
            border-width: 30px;
            border-style: solid;
            border-top-color: red;
            border-bottom-color: transparent;
            border-right-color: transparent;
            border-left-color: transparent;
        }
        .box4{
            width: 0;
            height: 0;
            border-width: 30px;
            border-style: solid;
            border-color: transparent;
            border-left-color: orange;
        }
        .box5{
            /* 首行空两个 */
            text-indent: 2em;
        }
        .text-sl{
            width: 100px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    </style>
</head>
<body>
    <h3>各个颜色的边框</h3>
    <div class="box1"></div>
    <h3>四个三角</h4>
    <div class="box2"></div>
    <h3>三角</h3>
    <div class="box3"></div>
    <h3>代码简化版</h3>
    <div class="box4"></div>

    <h4>text-indent：首行空两格</h4>
    <input type="text" class="box5">

    <h3>单行文本截断和显示省略号的三大件</h3>
    <div class="text-sl">
        是的尽快发货的刷卡缴费号地块萨芬阿萨德合法登记卡上合法几十块的发挥看
    </div>
    <h3>多行文本截断和显示省略，js算法</h3>
    <div style="width: 100px;">
        是的尽快发货的刷卡缴费号地块萨芬阿萨德合法登记卡上合法几十块的发挥看...
    </div>
</body>
</html>